home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 05.zip
/
BS1 part 5
/
IM_3 .adf
/
Exec
/
piarc.LZH
/
postiv.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1992-08-20
|
2KB
|
98 lines
/*
* postiv.rexx - script to drive single-frame recorder!
*/
/*
* Always include this block of code which can load the libraries:
*/
if ~show('L',"rexxsupport.library") then do
if addlib('rexxsupport.library',0,-30,0) then do
/* everything's ok */
end;
else do
say 'We Have A Library Problem, Unable To Load "rexxsupport.library"';
say 'Cannot operate this module without the library - sorry!';
exit 10;
end;
end;
prtnme = 'IM_Port';
sfcnme = 'BCDAREXX.PORT';
ivname = 'IMIV24';
cmdpath = 'c:';
if open(fhandle,'rexx:picmdpath','read') then do /* open the file */
cmdpath = readln(fhandle);
call close(fhandle); /* close the file */
end
address(prtnme); /* communicate with image processor we found */
themode = 0; /* selects leave scale alone */
theres = 0; /* select high resolution (1) */
thelace = 1; /* selects interlace (1) */
thescan = 1; /* selects overscan (1) */
plist = showlist('p'); /* is SFC active??? */
if index(plist,sfcnme) = 0 then do
'message Oh No! No Single Frame Recorder ARexx Port!!!';
exit 0;
end;
options results;
'current';
parse var result bname ',' bnum ',' breast;
'jackin'; /* attach to image processor's internal data structure */
jackptr = result; /* fetch the return value from the std ARexx return */
options; /* disallow return values from further commands */
'lockimage '||bnum;
address command run cmdpath||'imiv24 '||jackptr||' '||theres||' '||thelace||' '||thescan||' '||themode||' '||pal;
/*
* wait for port to show up!
*/
plist = showlist('p');
loopc = 0;
do while index(plist,ivname) = 0
call delay(50); /* tick a second at a time */
plist = showlist('p');
loopc = loopc+1;
if loopc = 60 then do
'unlockimage '||bnum;
exit 0;
end;
end;
/*
* We have the port; now we have to send the image to the SFR.
*/
target = 5400;
if show('C',sfctarget) = 1 then do
target = getclip(sfctarget);
end;
incr = 1;
if show('C',sfcincr) = 1 then do
incr = getclip(sfcincr);
end;
address(sfcnme);
'-x EDTP 5';
'-x EDOT '||target;
'-x APND '||incr;
target = target + incr;
call setclip(sfctarget,target);
dtime = 50 * 12;
call delay(dtime); /* wait for SFR to record */
address 'IMIV24' 'quit'; /* terminate iv24 display operation */
/*
* Finally, since the image has been recorded, we can now unlock the
* buffer for future operations.
*/
address(prtnme);
'unlockimage '||bnum;
'finish';